package com.ohs.dal.dao.impl;

import java.util.Date;
import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.ohs.dal.dao.AbstractDAO;
import com.ohs.dal.model.Entity;

public class AbstractDAOImpl<E extends Entity> extends HibernateDaoSupport implements AbstractDAO<E>{

	
	public void add(E entity) {
		getHibernateTemplate().save(entity);

	}
	
	public void delete(E entity) {
		getHibernateTemplate().delete(entity);
	}

	public void update(E entity) {
		entity.setUpdateDate(new Date());
		getHibernateTemplate().saveOrUpdate(entity);
	}

	public List<E> list() {
		return null;
	}

}